1. Import cleaned .csv file and look at dataframe.

2. Remove excess columns.

(e.g. pan + crucible data recorded prior to final calcualted weights)

# remove pan, crucible, and sediment combo weights not necessary for analysis
cr.mat = cr.mat %>% 
  select(-na.rm, -pan_number, -pan_weight, -pan_sed_ww_pre_60C, -pan_sed_dw_post_60C, -pan_sed_dw_pre_450C, -pan_sed_dw_post450C, -crucible_weight, -crucible_sed_dw_pre_950C, -crucible_sed_dw_post_950C, -sed_ww_pre_60C, -sed_dw_post_60C, -sed_dw_pre_450C, -sed_dw_post_450C, -sed_dw_pre_950C, -sed_dw_post_950C)


colnames(cr.mat)
##  [1] "X"                "otter_region"     "site"            
##  [4] "latitude"         "longitude"        "core_letter"     
##  [7] "layer_number"     "layer_thickness"  "layer_volume"    
## [10] "sample_volume"    "dry_bulk_density" "om_weight"       
## [13] "im_weight"        "om_percent"       "im_percent"      
## [16] "om.im_ratio"      "om_density"       "im_density"      
## [19] "core_depth"


3. Where are the processed cores from?

# new data frame for all cores
locations_all = cr.mat %>%
  distinct(cr.mat, latitude, longitude, site) %>%
  drop_na()

# map "locations_all"
leaflet(locations_all) %>%
  addTiles() %>%
  addMarkers(~longitude, ~latitude, popup = ~site, label = ~site)


4. Plotting

All sites


You will notice that site L06 is way different than the rest, so far. This core was loaded with chunky woody debris; it’s real data but an outlier compared to the other sites. Here are two images of the sliced core from site L06:


For the sake of looking at regional patterns, let’s remove site L06 until we have more sites processed:

cr.mat_noL06 = cr.mat[-c(1:30),] # remove L06 (for now) because organic matter is off the scale



Here are the data, by site, without L06:



Here are the data grouped by sea otter zone (witout L06)